-- GENERATED SPELL FOR [Scorned Spirit of Water] --


function spell0_21131(pUnit, Event) --@Call to the Spirits,Self--
pUnit:FullCastSpellOnTarget(36206,pUnit)
pUnit:RegisterEvent('Sorts_21131', 554, 1)
end

function spell1_21131(pUnit, Event) --@Water Bubble Head,Self--
pUnit:FullCastSpellOnTarget(35923,pUnit)
pUnit:RegisterEvent('Sorts_21131', 610, 1)
end

function Sorts_21131(pUnit, Event)
local choix_sorts_21131 = math.random(0, 1)
if choix_sorts_21131 == 0 then
pUnit:RegisterEvent('spell0_21131', 1, 1)
end
if choix_sorts_21131 == 1 then
pUnit:RegisterEvent('spell1_21131', 1, 1)
end
end

function mob21131_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21131', math.random(1500, 3000), 1)
end

function mob21131_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21131_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21131_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21131, 1, 'mob21131_Action')
RegisterUnitEvent(21131, 2, 'mob21131_Leave')
RegisterUnitEvent(21131, 3, 'mob21131_Kill')
RegisterUnitEvent(21131, 4, 'mob21131_Die')
